package br.edu.urfpr.backuptools.servidorBackup.rmi;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import br.edu.utfpr.comum.RmiProvider;

public class Servidor {
	public void inicia(){
		try {
			RmiProvider provider = new RmiProviderImpl();
			Registry registry = LocateRegistry.createRegistry(1099);
            registry.rebind("BackupToolsService", provider);
            System.out.println("Servidor executando servico 'BackupToolsService'");
            
        } catch (Exception e) {
            e.printStackTrace();
        }
	}
}
